<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%@page import="java.text.SimpleDateFormat"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
	response.setContentType("text/html;charset=UTF-8");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>报销审批</title>
    
  	<link rel="stylesheet" href="css/four.css" type="text/css"></link>
  	<script type="text/javascript" src="js/win_center.js"></script>
  	<script type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
  	<script type="text/javascript">
  		function selectAll(obj){
  			var updateCbo= document.getElementsByName("updateCbo");
  			for(var i=0;i<updateCbo.length;i++){
  				updateCbo[i].checked=obj.checked;
  			}
  		}
  		
  		function checkCbo(){
  			var updateCbo= document.getElementsByName("updateCbo");
  			var claimSubmit= document.getElementsByName("claimSubmit");
  				for(var i=0;i<updateCbo.length;i++){
  						if(updateCbo[i].checked==true){
  							claimSubmit[0].disabled=false;
  							claimSubmit[1].disabled=false;
  							return;
  						}
  						claimSubmit[0].disabled=true;
  						claimSubmit[1].disabled=true;
  				}
  			}
  	</script>
  <script type="text/javascript" src="js/jquery-1.6.js"></script>
  <script type="text/javascript" src="js/hidden.js"></script></head>
  <body>
    <div class="topTitle">
  		&nbsp;<img src="images/main_28.gif"/>&nbsp;报销审批
  	</div>
  	<form action="" method="post">
  	<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="table01">
 		 <tr> 
    		<td nowrap="nowrap" class="td_top" align="left"">以下为各员工申请报销信息</td>
  		</tr>
  	</table>
  	</form> 
  	<form action="updateClaim" method="post">
  		<table class="table_list">
 			<s:if test="claimList.size==0">
 				<tr> 
				    <td class="td_scheduleList_top" align="center">申请人</td>
				    <td class="td_scheduleList_top" align="center">报销理由</td>
				    <td class="td_scheduleList_top" align="center">报销金额</td>
				    <td class="td_scheduleList_top" align="center">操作
				    </td>
 				</tr>
 				<tr>
 					<td class="td_list" colspan="4" align="center">暂时没有未审核的报销申请</td>
 				</tr>
 			</s:if>
 			<s:else>
 			<display:table decorator="org.displaytag.decorator.CheckboxTableDecorator" name="claimList"  requestURI="/getAllClaim" class="table_list" id="claim" defaultorder="descending" pagesize="10">
	  			<display:column property="employee.userName" title="申请人" headerClass="td_scheduleList_top" class="td_list"></display:column>
	  			<display:column property="cvItem" title="报销理由"  headerClass="td_scheduleList_top" class="td_list"></display:column>
	  			<display:column property="account" title="报销金额"  headerClass="td_scheduleList_top" class="td_list" sortable="true"></display:column>
	  			<display:column title="操作 <input type='checkbox' onclick='selectAll(this);checkCbo()'/> "  headerClass="td_scheduleList_top" class="td_list">
	  				<input type="checkbox" name="updateCbo" value="${claim.cvId}" onclick="checkCbo()"/>
	  			</display:column>
	  		</display:table>
	  		<table class="weekTitle" cellspacing="0" cellpadding="0" width="95%" align="center">
		 	 	<tr>
		 	 		<td colspan="3" width="85%"></td>
		        	<td  align="center"><input type="hidden" name="employee.userId" value="${employee.userId}" />
		        		<input value="批 准" class="buttonface" type="submit" name="claimSubmit" disabled="disabled"/>&nbsp;&nbsp;&nbsp;
		        		<input value="拒 绝" class="buttonface" type="submit" name="claimSubmit" disabled="disabled"/>&nbsp;&nbsp;&nbsp;
		        	</td>
		    	</tr>
  			</table>
 			</s:else>
  		</table>
  		</form>
  </body>
</html>
